import java.util.Scanner;

public class HotelMgySystem {
    public static void main(String[] args) {
        Hotel hotel = new Hotel();
        System.out.println("欢迎使用酒店管理系统");
        System.out.println("请输入对应序号：[1]查看酒店房间状态  [2]定房  [3]退房  [0] 退出");
        while (true) {
            Scanner sc = new Scanner(System.in);
            int n = sc.nextInt();
            if (n == 1) {   // 查看酒店状态
                hotel.printState();
            } else if(n == 2) {
                System.out.println("请输入要定的房间号：");
                int num = sc.nextInt();
                hotel.order(num);
            } else if (n == 3) {
                System.out.println("请输入要退订的房间号：");
                int num = sc.nextInt();
                hotel.refund(num);
            } else if (n == 0) {
                System.out.println("程序退出，欢迎下次使用");
                return;
            } else {
                System.out.println("输入错误，请重新输入");
            }


        }
    }

}
